package com.augurit.wf.mgmt.web.form;

import java.util.Date;

import com.augurit.common.base.form.BaseForm;
import com.augurit.wf.common.entity.Jbpm4Execution;
import com.augurit.wf.common.entity.Jbpm4HistProcinst;
import com.augurit.wf.common.entity.WfBusInstance;

public class WfProcessInstanceForm extends BaseForm {
	//流程实例基本属性
	private String id;		//流程实例id
	private String processInstanceName;
	private String activityName;	//流程实例所处节点
	private String state;			//流程实例状态
	private String isTimeOut;		//流程实例是否超时
	private String processDefinitionKey;	//流程定义key
	private Integer processDefinitioVersion;	//流程定义版本
	private Date processDuedate;//流程时限
	private String masterEntity;
	private String masterEntityKey;
	
	private String busMemo1;
	private String busMemo2;
	private String busMemo3;
	private String busMemo4;
	private String busMemo5;
	
	public WfProcessInstanceForm(){
		super();
	}
	
	public WfProcessInstanceForm(String activityName){
		this.activityName = activityName;
	}
	
	public WfProcessInstanceForm (String id,String activityName,String state,Date processDuedate,String masterEntity,String masterEntityKey,String busMemo1,String busMemo2,String busMemo3,String busMemo4,String busMemo5){
		this.id = id;
		this.activityName = activityName;
		this.state = state;
		this.processDuedate = processDuedate;
		this.masterEntity = masterEntity;
		this.masterEntityKey = masterEntityKey;
		
		this.busMemo1 = busMemo1;
		this.busMemo2 = busMemo2;
		this.busMemo3 = busMemo3;
		this.busMemo4 = busMemo4;
		this.busMemo5 = busMemo5;
		
		//设置超时，如果限制时间大于当前时间，就表示超时
		if(processDuedate != null){
			Date currentDate = new Date();
			if(currentDate.after(processDuedate))
				isTimeOut = "<font color='red'>是</font>";
			else
				isTimeOut = "<font color='green'>否</font>";
		}
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getActivityName() {
		return activityName;
	}
	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getIsTimeOut() {
		return isTimeOut;
	}
	public void setIsTimeOut(String isTimeOut) {
		this.isTimeOut = isTimeOut;
	}
	public String getProcessInstanceName() {
		return processInstanceName;
	}
	public void setProcessInstanceName(String processInstanceName) {
		this.processInstanceName = processInstanceName;
	}
	public String getProcessDefinitionKey() {
		return processDefinitionKey;
	}
	public void setProcessDefinitionKey(String processDefinitionKey) {
		this.processDefinitionKey = processDefinitionKey;
	}
	public Integer getProcessDefinitioVersion() {
		return processDefinitioVersion;
	}
	public void setProcessDefinitioVersion(Integer processDefinitioVersion) {
		this.processDefinitioVersion = processDefinitioVersion;
	}

	public Date getProcessDuedate() {
		return processDuedate;
	}

	public void setProcessDuedate(Date processDuedate) {
		this.processDuedate = processDuedate;
	}

	public String getMasterEntity() {
		return masterEntity;
	}

	public void setMasterEntity(String masterEntity) {
		this.masterEntity = masterEntity;
	}

	public String getMasterEntityKey() {
		return masterEntityKey;
	}

	public void setMasterEntityKey(String masterEntityKey) {
		this.masterEntityKey = masterEntityKey;
	}

	public String getBusMemo1() {
		return busMemo1;
	}

	public void setBusMemo1(String busMemo1) {
		this.busMemo1 = busMemo1;
	}

	public String getBusMemo2() {
		return busMemo2;
	}

	public void setBusMemo2(String busMemo2) {
		this.busMemo2 = busMemo2;
	}

	public String getBusMemo3() {
		return busMemo3;
	}

	public void setBusMemo3(String busMemo3) {
		this.busMemo3 = busMemo3;
	}

	public String getBusMemo4() {
		return busMemo4;
	}

	public void setBusMemo4(String busMemo4) {
		this.busMemo4 = busMemo4;
	}

	public String getBusMemo5() {
		return busMemo5;
	}

	public void setBusMemo5(String busMemo5) {
		this.busMemo5 = busMemo5;
	}
	
}